import 'package:getxdemo/generated/json/base/json_convert_content.dart';
import 'package:getxdemo/adv_model_entity.dart';

AdvModelEntity $AdvModelEntityFromJson(Map<String, dynamic> json) {
	final AdvModelEntity advModelEntity = AdvModelEntity();
	final int? code = jsonConvert.convert<int>(json['code']);
	if (code != null) {
		advModelEntity.code = code;
	}
	final String? msg = jsonConvert.convert<String>(json['msg']);
	if (msg != null) {
		advModelEntity.msg = msg;
	}
	final AdvModelData? data = jsonConvert.convert<AdvModelData>(json['data']);
	if (data != null) {
		advModelEntity.data = data;
	}
	return advModelEntity;
}

Map<String, dynamic> $AdvModelEntityToJson(AdvModelEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['code'] = entity.code;
	data['msg'] = entity.msg;
	data['data'] = entity.data?.toJson();
	return data;
}

AdvModelData $AdvModelDataFromJson(Map<String, dynamic> json) {
	final AdvModelData advModelData = AdvModelData();
	final AdvModelDataAdvPlace? advPlace = jsonConvert.convert<AdvModelDataAdvPlace>(json['advPlace']);
	if (advPlace != null) {
		advModelData.advPlace = advPlace;
	}
	final List<AdvModelDataAdv>? adv = jsonConvert.convertListNotNull<AdvModelDataAdv>(json['adv']);
	if (adv != null) {
		advModelData.adv = adv;
	}
	return advModelData;
}

Map<String, dynamic> $AdvModelDataToJson(AdvModelData entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['advPlace'] = entity.advPlace?.toJson();
	data['adv'] =  entity.adv?.map((v) => v.toJson()).toList();
	return data;
}

AdvModelDataAdvPlace $AdvModelDataAdvPlaceFromJson(Map<String, dynamic> json) {
	final AdvModelDataAdvPlace advModelDataAdvPlace = AdvModelDataAdvPlace();
	final String? advPlaceId = jsonConvert.convert<String>(json['advPlaceId']);
	if (advPlaceId != null) {
		advModelDataAdvPlace.advPlaceId = advPlaceId;
	}
	final String? advPlaceName = jsonConvert.convert<String>(json['advPlaceName']);
	if (advPlaceName != null) {
		advModelDataAdvPlace.advPlaceName = advPlaceName;
	}
	final int? advPlaceType = jsonConvert.convert<int>(json['advPlaceType']);
	if (advPlaceType != null) {
		advModelDataAdvPlace.advPlaceType = advPlaceType;
	}
	final String? createTime = jsonConvert.convert<String>(json['createTime']);
	if (createTime != null) {
		advModelDataAdvPlace.createTime = createTime;
	}
	final dynamic? createBy = jsonConvert.convert<dynamic>(json['createBy']);
	if (createBy != null) {
		advModelDataAdvPlace.createBy = createBy;
	}
	final String? updateTime = jsonConvert.convert<String>(json['updateTime']);
	if (updateTime != null) {
		advModelDataAdvPlace.updateTime = updateTime;
	}
	final dynamic? updateBy = jsonConvert.convert<dynamic>(json['updateBy']);
	if (updateBy != null) {
		advModelDataAdvPlace.updateBy = updateBy;
	}
	final dynamic? startFlag = jsonConvert.convert<dynamic>(json['startFlag']);
	if (startFlag != null) {
		advModelDataAdvPlace.startFlag = startFlag;
	}
	final dynamic? playTime = jsonConvert.convert<dynamic>(json['playTime']);
	if (playTime != null) {
		advModelDataAdvPlace.playTime = playTime;
	}
	return advModelDataAdvPlace;
}

Map<String, dynamic> $AdvModelDataAdvPlaceToJson(AdvModelDataAdvPlace entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['advPlaceId'] = entity.advPlaceId;
	data['advPlaceName'] = entity.advPlaceName;
	data['advPlaceType'] = entity.advPlaceType;
	data['createTime'] = entity.createTime;
	data['createBy'] = entity.createBy;
	data['updateTime'] = entity.updateTime;
	data['updateBy'] = entity.updateBy;
	data['startFlag'] = entity.startFlag;
	data['playTime'] = entity.playTime;
	return data;
}

AdvModelDataAdv $AdvModelDataAdvFromJson(Map<String, dynamic> json) {
	final AdvModelDataAdv advModelDataAdv = AdvModelDataAdv();
	final String? advId = jsonConvert.convert<String>(json['advId']);
	if (advId != null) {
		advModelDataAdv.advId = advId;
	}
	final String? advPlaceId = jsonConvert.convert<String>(json['advPlaceId']);
	if (advPlaceId != null) {
		advModelDataAdv.advPlaceId = advPlaceId;
	}
	final String? advText = jsonConvert.convert<String>(json['advText']);
	if (advText != null) {
		advModelDataAdv.advText = advText;
	}
	final String? advPicUrl = jsonConvert.convert<String>(json['advPicUrl']);
	if (advPicUrl != null) {
		advModelDataAdv.advPicUrl = advPicUrl;
	}
	final String? advLinkUrl = jsonConvert.convert<String>(json['advLinkUrl']);
	if (advLinkUrl != null) {
		advModelDataAdv.advLinkUrl = advLinkUrl;
	}
	final dynamic? advNativeUrl = jsonConvert.convert<dynamic>(json['advNativeUrl']);
	if (advNativeUrl != null) {
		advModelDataAdv.advNativeUrl = advNativeUrl;
	}
	final dynamic? advMpUrl = jsonConvert.convert<dynamic>(json['advMpUrl']);
	if (advMpUrl != null) {
		advModelDataAdv.advMpUrl = advMpUrl;
	}
	final int? advStatus = jsonConvert.convert<int>(json['advStatus']);
	if (advStatus != null) {
		advModelDataAdv.advStatus = advStatus;
	}
	final int? jumpType = jsonConvert.convert<int>(json['jumpType']);
	if (jumpType != null) {
		advModelDataAdv.jumpType = jumpType;
	}
	final String? jumpContent = jsonConvert.convert<String>(json['jumpContent']);
	if (jumpContent != null) {
		advModelDataAdv.jumpContent = jumpContent;
	}
	final int? advSerial = jsonConvert.convert<int>(json['advSerial']);
	if (advSerial != null) {
		advModelDataAdv.advSerial = advSerial;
	}
	final dynamic? beginTime = jsonConvert.convert<dynamic>(json['beginTime']);
	if (beginTime != null) {
		advModelDataAdv.beginTime = beginTime;
	}
	final dynamic? endTime = jsonConvert.convert<dynamic>(json['endTime']);
	if (endTime != null) {
		advModelDataAdv.endTime = endTime;
	}
	final int? delFlag = jsonConvert.convert<int>(json['delFlag']);
	if (delFlag != null) {
		advModelDataAdv.delFlag = delFlag;
	}
	final String? createTime = jsonConvert.convert<String>(json['createTime']);
	if (createTime != null) {
		advModelDataAdv.createTime = createTime;
	}
	final String? createBy = jsonConvert.convert<String>(json['createBy']);
	if (createBy != null) {
		advModelDataAdv.createBy = createBy;
	}
	final String? updateTime = jsonConvert.convert<String>(json['updateTime']);
	if (updateTime != null) {
		advModelDataAdv.updateTime = updateTime;
	}
	final String? updateBy = jsonConvert.convert<String>(json['updateBy']);
	if (updateBy != null) {
		advModelDataAdv.updateBy = updateBy;
	}
	final String? version = jsonConvert.convert<String>(json['version']);
	if (version != null) {
		advModelDataAdv.version = version;
	}
	final String? describe = jsonConvert.convert<String>(json['describe']);
	if (describe != null) {
		advModelDataAdv.describe = describe;
	}
	final dynamic? topicTitle = jsonConvert.convert<dynamic>(json['topicTitle']);
	if (topicTitle != null) {
		advModelDataAdv.topicTitle = topicTitle;
	}
	final dynamic? topicId = jsonConvert.convert<dynamic>(json['topicId']);
	if (topicId != null) {
		advModelDataAdv.topicId = topicId;
	}
	final dynamic? topicContent = jsonConvert.convert<dynamic>(json['topicContent']);
	if (topicContent != null) {
		advModelDataAdv.topicContent = topicContent;
	}
	final dynamic? topicPicUrl = jsonConvert.convert<dynamic>(json['topicPicUrl']);
	if (topicPicUrl != null) {
		advModelDataAdv.topicPicUrl = topicPicUrl;
	}
	final dynamic? bookDriveUrl = jsonConvert.convert<dynamic>(json['bookDriveUrl']);
	if (bookDriveUrl != null) {
		advModelDataAdv.bookDriveUrl = bookDriveUrl;
	}
	return advModelDataAdv;
}

Map<String, dynamic> $AdvModelDataAdvToJson(AdvModelDataAdv entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['advId'] = entity.advId;
	data['advPlaceId'] = entity.advPlaceId;
	data['advText'] = entity.advText;
	data['advPicUrl'] = entity.advPicUrl;
	data['advLinkUrl'] = entity.advLinkUrl;
	data['advNativeUrl'] = entity.advNativeUrl;
	data['advMpUrl'] = entity.advMpUrl;
	data['advStatus'] = entity.advStatus;
	data['jumpType'] = entity.jumpType;
	data['jumpContent'] = entity.jumpContent;
	data['advSerial'] = entity.advSerial;
	data['beginTime'] = entity.beginTime;
	data['endTime'] = entity.endTime;
	data['delFlag'] = entity.delFlag;
	data['createTime'] = entity.createTime;
	data['createBy'] = entity.createBy;
	data['updateTime'] = entity.updateTime;
	data['updateBy'] = entity.updateBy;
	data['version'] = entity.version;
	data['describe'] = entity.describe;
	data['topicTitle'] = entity.topicTitle;
	data['topicId'] = entity.topicId;
	data['topicContent'] = entity.topicContent;
	data['topicPicUrl'] = entity.topicPicUrl;
	data['bookDriveUrl'] = entity.bookDriveUrl;
	return data;
}